package com.youkeda.dewu.dataobject;

import java.io.Serializable;
import java.util.Date;

import com.youkeda.dewu.model.PaymentRecord;
import lombok.Data;
import org.springframework.beans.BeanUtils;

/**
 * ykd_payment_record
 * @author 
 */
@Data
public class PaymentRecordDO implements Serializable {
    /**
     * 主键id
     */
    private String id;

    /**
     * 用户id
     */
    private String userId;

    /**
     * 订单号
     */
    private String orderNumber;

    /**
     * 外部支付渠道主键id
     */
    private String channelPaymentId;

    /**
     * 渠道类型
     */
    private String channelType;

    /**
     * 支付金额
     */
    private Double amount;

    /**
     * 支付类型
     */
    private String payType;

    /**
     * 支付状态
     */
    private String payStatus;

    /**
     * 订单额外信息
     */
    private String extendStr;

    /**
     * 支付时间
     */
    private String payEndTime;

    private Date gmtCreated;

    private Date gmtModified;

    private static final long serialVersionUID = 1L;

    public PaymentRecordDO() {
    }

    public PaymentRecordDO(PaymentRecord paymentRecord) {
        BeanUtils.copyProperties(paymentRecord,this);
    }

    public PaymentRecord toModel(){
        PaymentRecord paymentRecord = new PaymentRecord();
        BeanUtils.copyProperties(this,paymentRecord);
        return paymentRecord;
    }
}